@extends('Admin.layout.layout')
@section('title','用户修改')
@section('con')
@if (count($errors) > 0)
    <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
	<div class="portlet-body form" style="margin-left: 200px;">
		<!-- {{session('error')}} -->
		
		<form action="{{url('/admin/user/update')}}" method="post" id="form_sample_1" class="form-horizontal" novalidate="novalidate" style="height:400px;">
			<div class="control-group"style="margin-bottom:40px">
				<label class="control-label">用户名<span>：</span></label>
				<div class="controls">
					<input name="username" data-required="1" class="span6 m-wrap" type="text" value="{{$userinfo->username}}">
				</div>
			</div>
			{{csrf_field()}}
			<div class="control-group"style="margin-bottom:40px">
				<label class="control-label">邮箱<span>：</span></label>
				<div class="controls"style="margin-bottom:10px">
					<input name="email" data-required="1" class="span6 m-wrap" type="text" value="{{$userinfo->email}}">
				</div>
			</div>
			<div class="control-group">

			<label class="control-label">权限<span>：</span></label>

			<div class="controls">

				<select class="span6 m-wrap" name="role">

					<option value="0">普通用户</option>

					<option value="1">VIP</option>

					<option value="2">作者</option>

					<option value="3">管理员</option>

				</select>

			</div>
			
		</div>
			<div class="form-actions" style="background:#fff;border-top:1px solid #fff">
			<input type="hidden" name="id" value="{{$userinfo->id}}">
				<button class="btn purple" style="width:320px">修改</button>
			</div>
		</form>

		<!-- END FORM-->

	</div>
@endsection